#ifndef AST_DECLARATIONS_DECLARATOR_H
#define AST_DECLARATIONS_DECLARATOR_H

#include "../ASTNode.h"

class Pointer;
class DirectDeclarator;

/*
C99   6.7.5
declarator:
		pointer(opt)    direct-declarator
*/

class Declarator : public ASTNode
{
protected:
	Declarator(void)
		: ASTNode(ASTNode::declarator){};
public:
	Declarator(DirectDeclarator *pDDecl, Pointer *pPointer = NULL)
		: ASTNode(ASTNode::declarator)
		, m_pDDecl(pDDecl)
		, m_pPointer(pPointer){};
	virtual ~Declarator(void);

	virtual void				codeGen();

protected:
	Pointer	*					m_pPointer; //may be NULL
	DirectDeclarator *			m_pDDecl;
};


#endif

